package demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 */

public class Test {
    public static void main(String[] args) {
        Robot robot = new Robot("小机器人","白色");
        robot.running();
    }











    public static void main1(String[] args) {
/*
        IRunning iRunning = new IRunning() ;//error
*/
    }
    public static void main2(String[] args) {
        Dog dog = new Dog("柴六斤",5);
        dog.running();
        dog.swimming();
        Duck duck = new Duck("小黄",2);
        duck.running();
        duck.fly();
        duck.swimming();
    }
}
